#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
	int n;
	cin >> n;
	while (n) {
		cout << n << " ";
		n /= 2;
	}
	return 0;
}
